package zd.vrp.utils;

import java.util.List;

import zd.vrp.global.Route;

public class SolutionUtils {
	/**
	 * calculate distance between two solution
	 */
	public static double distanceBetween2SolutionByObjective(List<Route> solution1, List<Route> solution2){
		int vehicleNum1 = solution1.size();
		int vehicleNum2 = solution2.size();

		double totalLength1 = TestUtils.getTotalLength(solution1);
		double totalLength2 = TestUtils.getTotalLength(solution2);
		
		return Math.sqrt(Math.pow((vehicleNum1-vehicleNum2),2)+Math.pow((totalLength1-totalLength2), 2));
	}
}
